import { http } from '@/utils/http'
import type {SMSSuccess,SMSPost,sign,signData,checkSign,dict} from '@/types/signSMS'
// 手机号注册（第一步请求）
export const postSignAPI = (data: SMSPost) => {
  return http<SMSSuccess>({
    method: 'POST',
    url: '/api/auth/sms/unPermissions/send',
    data
  })
}

// 注册接口请求/auth/user/unPermissions/register
export const postSign = (data: sign) => {
  return http<signData>({
    method: 'POST',
    url: '/api/auth/user/unPermissions/register',
    data
  })
}
// 获取国家列表
export const getCountryList = () => {
  return http<dict[]>({
    method: 'GET',
    url: '/api/auth/user/unPermissions/getAreaCodeList',
  })
}

// 校验手机号是否被注册过
export const checkMobile = (data:checkSign) => {
  return http({
    method: 'POST',
    url: '/api/auth/user/unPermissions/checkUser',
    data,
  })
}
